//
//  RefundFlowStepCell.m
//  BaseProject
//
//  Created by 王洋 on 2020/9/17.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "RefundFlowStepCell.h"

@implementation RefundFlowStepCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)fillCellWithModel:(RefundFlowModel *)model index:(NSInteger)index {
    
    [self.tagBtn setTitle:[NSString stringWithFormat:@"%ld",index + 1] forState:UIControlStateNormal];
    
    self.titleLab.text = model.refundRemark;
    
    self.time.text = model.sureTime;
    
    switch (model.nowStatus) {
        case 1:{
            self.tagLine.hidden = NO;
        } break;
        case 2:{
            self.tagLine.hidden = NO;
        } break;
        case 3:{
            self.tagLine.hidden = NO;
        } break;
        case 4:{
            self.tagLine.hidden = NO;
        } break;
        case 5:{
            self.tagLine.hidden = NO;
        } break;
        case 6:{
            self.tagLine.hidden = NO;
        } break;
        case 7:{
            self.tagLine.hidden = YES;
        } break;
        case 8:{
            self.tagLine.hidden = YES;
        } break;
        default:
            break;
    }
    
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self.tagBtn pp_clipCorners:UIRectCornerAllCorners radius:self.tagBtn.frame.size.height/2];
    });
}

@end
